<div class="col-sm-12 mt20">

    <div class="panel panel-default">
        <div class="panel-body" ng-keyup="myKeyup($event)">
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="店铺编号" ng-model="pageInfo.company_code">
            </div>
            <div class="col-sm-2">
            </div>
            <div class="col-sm-2">
            </div>
            <div class="col-sm-2">
            </div>
            <div class="col-sm-2">
                <button class="btn btn-success search btn-block" ng-click="create()">创建店铺</button>
            </div>
            <div class="col-sm-2">
                <button class="btn btn-info search btn-block" ng-click="loadlist()">立即搜索</button>
            </div>
        </div>

        <div class="panel-body">
            <table class="table table-striped table-bordered dataTable table-condensed tree_table" style="table-layout:fixed">
                <thead>
                    <tr>
                        <th class="col-md-2 text-center">机构名称/代码</th>
                        <th class="col-md-1 text-center">最多分销层级</th>
                        <th class="col-md-1 text-center">是否允许使用补贴</th>
                        <th class="col-md-1 text-center">补贴使用规则</th>
                        <th class="col-md-1 text-center">是否允许领取补贴</th>
                        <th class="col-md-1 text-center">手续费率</th>
                        <th class="col-md-1 text-center">店铺状态</th>
                        <th class="col-md-1 text-center">店铺下单利润</th>
                        <th class="col-md-1 text-center">三级分润</th>
                        <th class="col-md-1 text-center">创建时间</th>
                        <th class="col-md-1 text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="bean in beanList">
                        <td class="text-center">
                            {{bean.company_name}}
                            <br/>【{{bean.company_code}}】
                        </td>
                        <td class="text-center">{{bean.max_grade}}</td>
                        <td class="text-center">{{bean.subsidy_allow == '1'? '允许': '不允许'}}</td>
                        <td class="text-center">{{bean.subsidy_rule == '1'? '可以跨店铺使用': '只能本店铺使用'}}</td>
                        <td class="text-center">{{bean.subsidy == '1'? '允许': '不允许'}}</td>
                        <td class="text-center">{{bean.service_charge}}‰</td>
                        <td class="text-center">{{bean.state == '1'? '活着': '封杀'}}</td>
                        <td class="text-center">{{bean.profit_flag == '1'? '首次绑定分销': '店铺'}}</td>
                        <td class="text-center">{{bean.profit_level1}}/{{bean.profit_level2}}/{{bean.profit_level3}}%</td>
                        <td class="text-center">{{bean.create_time}}</td>
                        <td class="text-center">
                            <button type="button" class="btn btn-info btn-xs" ng-click="info(bean)">编辑</button>
                            <button type="button" class="btn btn-danger btn-xs" ng-click="delete(bean)">删除</button>
                            <button type="button" class="btn btn-warning btn-xs" ng-click="stop(bean)" ng-if="bean.state == '1'">封杀</button>
                            <button type="button" class="btn btn-success btn-xs" ng-click="start(bean)" ng-if="bean.state == '0'">解封</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="text-right" style="background-color: white; margin-right: 30px">
            <pagination total-items="pageInfo.totalItems" ng-model="pageInfo.pageNo" ng-change="loadlist()" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false" items-per-page="pageInfo.pageSize"
                class="m-t-none m-b"></pagination>
        </div>

    </div>
</div>